package com.agilya.modele;

public class Proposition {

	private int id;
	private String texte;
	private boolean estCorrecte;
	private boolean estActive;
	private boolean estEliminatoire;
	private double coefficient;

	// private Date dateCreation; // pas encore utilisé
	// private int version; // pas encore utilisé

	/**
	 * @param id
	 * @param texte
	 * @param estCorrecte
	 * @param estActive
	 * @param estEliminatoire
	 * @param coefficient
	 */
	public Proposition(int id, String texte, boolean estCorrecte, boolean estActive, boolean estEliminatoire, double coefficient) {
		this.id = id;
		this.texte = texte;
		this.estCorrecte = estCorrecte;
		this.estActive = estActive;
		this.estEliminatoire = estEliminatoire;
		this.coefficient = coefficient;
	}

	public Proposition(String texte, boolean estCorrecte, boolean estActive, boolean estEliminatoire, double coefficient) {
		this.texte = texte;
		this.estCorrecte = estCorrecte;
		this.estActive = estActive;
		this.estEliminatoire = estEliminatoire;
		this.coefficient = coefficient;
	}

	/**
	 * @return the texte
	 */
	public String getTexte() {
		return texte;
	}

	/**
	 * @param texte
	 *            the texte to set
	 */
	public void setTexte(String texte) {
		this.texte = texte;
	}

	/**
	 * @return the estCorrecte
	 */
	public boolean estCorrecte() {
		return estCorrecte;
	}

	/**
	 * @param estCorrecte
	 *            the estCorrecte to set
	 */
	public void setEstCorrecte(boolean estCorrecte) {
		this.estCorrecte = estCorrecte;
	}

	/**
	 * @return the estActive
	 */
	public boolean estActive() {
		return estActive;
	}

	/**
	 * @param estActive
	 *            the estActive to set
	 */
	public void setEstActive(boolean estActive) {
		this.estActive = estActive;
	}

	/**
	 * @return the estEliminatoire
	 */
	public boolean estEliminatoire() {
		return estEliminatoire;
	}

	/**
	 * @param estEliminatoire
	 *            the estEliminatoire to set
	 */
	public void setEstEliminatoire(boolean estEliminatoire) {
		this.estEliminatoire = estEliminatoire;
	}

	/**
	 * @return the coefficient
	 */
	public double getCoefficient() {
		return coefficient;
	}

	/**
	 * @param coefficient
	 *            the coefficient to set
	 */
	public void setCoefficient(double coefficient) {
		this.coefficient = coefficient;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	// /**
	// * @return the dateCreation
	// */
	// /*
	// * public Date getDateCreation() { return dateCreation; }
	// *//**
	// * @param dateCreation
	// * the dateCreation to set
	// */
	// /*
	// * public void setDateCreation(Date dateCreation) { this.dateCreation = dateCreation; }
	// *//**
	// * @return the version
	// */
	// /*
	// * public int getVersion() { return version; }
	// *//**
	// * @param version
	// * the version to set
	// */
	// /*
	// * public void setVersion(int version) { this.version = version; }
	// */

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {

		if (this.getClass() == obj.getClass() && this.id == ((Proposition) obj).getId()) {
			return true;
		} else {
			return false;
		}
	}

}
